package com.jeesite.modules.stock.dao;

import com.jeesite.modules.stock.dao.mapper.UserRequestLogsMapper;
import com.jeesite.modules.stock.entity.UserRequestLogsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
public class UserRequestLogsDao {

    @Autowired
    private UserRequestLogsMapper mapper;

    public void insert(UserRequestLogsEntity entity) {
        mapper.insert(entity);
    }

    public int getRequestCountAfterTime(String userId, String interfaceName, Date time) {
        return mapper.getRequestCountAfterTime(userId, interfaceName, time);
    }

    public void updateValid(String userId, Date time, Integer valid){
        mapper.updateValid(userId, time, valid);
    }
}
